package com.nuoniu.sibanyun.controller.crm.call;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nuoniu.sibanyun.common.BaseController;
import com.nuoniu.sibanyun.common.result.HttpResult;
import com.nuoniu.sibanyun.entity.crm.call.CrmCallMode;
import com.nuoniu.sibanyun.entity.crm.call.CrmCallVoice;
import com.nuoniu.sibanyun.entity.crm.call.dto.CrmCallModeSearchDto;
import com.nuoniu.sibanyun.service.crm.call.ICrmCallModeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 客户管理-外呼管理-快呼模式 前端控制器
 * </p>
 *
 * @author 白强
 * @since 2022-02-28
 */
@RestController
@RequestMapping("/crm/callMode")
@Api(tags = "客户管理-外呼管理-快呼模式")
public class CrmCallModeController extends BaseController {

    @Autowired
    private ICrmCallModeService modeService;


    @PostMapping("pageList")
    @ApiOperation(value = "分页查询 外呼模式")
    public HttpResult pageList(@RequestBody CrmCallModeSearchDto crmCallModeSearchDto) {
        return HttpResult.ok(modeService.pageList(crmCallModeSearchDto));
    }

    @PostMapping("saveMode")
    @ApiOperation(value = "保存")
    public HttpResult saveMode(@RequestBody CrmCallMode crmCallMode){
        modeService.saveMode(crmCallMode);
        return HttpResult.ok();
    }

    @DeleteMapping("delete")
    @ApiOperation(value = "删除 模式")
    public HttpResult delete(Long id){
        modeService.deleteById(id);
        return HttpResult.ok();
    }

}
